Release 10.1A: OpenEdge Data Management:
SQL Reference
Return values for DatabaseMetaData
Applications call methods of the DatabaseMetaData class to retrieve details about the JDBC support provided by the OpenEdge™ SQL JDBC driver.
Table 62 lists each method of the DatabaseMetaData class and shows what the JDBC driver returns when an application calls the method. For details on the format and usage of each method, see the Java Core API documentation for your platform. Many of the methods return lists of information as an object of type
ResultSet. Use the normalResultSetmethods, such asgetStringandgetInt, to retrieve the data from the result sets.
Table 62: Return values for DatabaseMetaData methods Method Description Returns Can all the procedures returned bygetProceduresbe called by the current user? Can all the tables returned bygetTablebeSELECTed by the current user? Does a data definition statement within a transaction force the transaction to commit? Is a data definition statement within a transaction ignored? DidgetMaxRowSize()includeLONGVARCHARandLONGVARBINARY BLOBs? Gets a description of a table’s optimal set of columns that uniquely identifies a row. (Result set) Gets the catalog names available in this database. (Result set) What is the separator between catalog and table names? NoneNo catalogs What is the database vendor’s preferred term forcatalog? NoneNo catalogs Gets a description of the access rights for a table’s columns. (Result set) Gets a description of table columns available in a catalog. (Result set)getCrossReference
(String, String, String, String, String, String) Gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describes how one table imports another’s key). This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once). They are ordered byFKTABLE_CAT,FKTABLE_SCHEM,FKTABLE_NAME, andKEY_SEQ. (Result set) What is the name of this database product? What is the version of this database product? What is the database’s default transaction isolation level? The values are defined injava.sql.Connection. What is the version of this JDBC driver? What is the minor version of this JDBC driver? What is the name of this JDBC driver? JDBC-PROGRESS
Windows:JdbcProgress.dllSolaris and Compaq Tru64:libJdbcProgress.soIBM AIX:libJdbcProgress.aHewlett Packard:libJdbcProgress.sl What is the version of this JDBC driver?1.1000 (03.60.0006) Gets a description of the foreign key columns that reference a table’s primary key columns (the foreign keys exported by a table). (Result set) Gets all the extra characters that can be used in unquoted identifier names (those beyonda–z,A–Z,0–9and_). “_”, “%” What is the string used to quote SQL identifiers? This returns a space“ ” if identifier quoting is not supported. “ ” Gets a description of the primary key columns that reference a table’s foreign key columns (the primary keys imported by a table). (Result set) Gets a description of a table’s indices and statistics. (Result set)getMaxBinaryLiteralLength() How many hex characters can you have in an inline binary literal?31995 What is the maximum length of a catalog name? NoneNo catalogs What is the maximum length for a character literal? What is the limit on column name length? What is the maximum number of columns in aGROUP BYclause? What is the maximum number of columns allowed in an index? What is the maximum number of columns in anORDER BYclause? What is the maximum number of columns in aSELECTlist? What is the maximum number of columns in a table? How many active connections can we have at a time to this database? What is the maximum cursor name length? What is the maximum length of an index (in bytes)? What is the maximum length of a procedure name? What is the maximum length of a single row?31,995bytes What is the maximum length allowed for a schema name? What is the maximum length of an SQL statement? How many active statements can we have open at one time to this database? What is the maximum length of a table name? What is the maximum number of tables in aSELECT? What is the maximum length of a user name? Gets a comma-separated list of math functions. Gets a description of a table’s primary key columns. (Result set) Get a description of a catalog’s stored procedure parameters and result columns. (Result set) Gets a description of stored procedures available in a catalog. (Result set) What is the database vendor’s preferred term forprocedure?procedure Gets the schema names available in this database. (Result set) What is the database vendor’s preferred term forschema?Owner This is the string that can be used to escape ‘_’ or ‘%’ in the string pattern style catalog search parameters.\ Gets a comma-separated list of all a database’s SQL keywords that are NOT also SQL keywords. See the OpenEdge SQL Reserved Words section for a complete list of reserved words. Gets a comma-separated list of string functions. Gets a comma-separated list of system functions. Gets a description of the access rights for each table available in a catalog. (Result set) Gets a description of tables available in a catalog. (Result set) Gets the table types available in this database. (Result set) Gets a comma-separated list of time and date functions. Gets a description of all the standard SQL types supported by this database. (Result set) What is the URL for this database? (The URL) What is our user name as known to the database? (User name) Gets a description of a table’s columns that are automatically updated when any value in a row is updated. (Result set) Does a catalog appear at the start of a qualified table name? Otherwise it appears at the end. Is the database in read-only mode? Are concatenations betweenNULLand non-NULLvaluesNULL? A JDBC-compliant driver always returns true. AreNULLvalues sorted at the end regardless of sort order?nullsAreSortedAtStart() AreNULLvalues sorted at the start regardless of sort order?False AreNULLvalues sorted high?True AreNULLvalues sorted low?False Does the database treat mixed-case, unquoted SQL identifiers as case insensitive and store them in lowercase?False Does the database treat mixed-case, quoted SQL identifiers as case insensitive and store them in lowercase?False Does the database treat mixed-case, unquoted SQL identifiers as case insensitive and store them in mixed case?False Does the database treat mixed-case, quoted SQL identifiers as case insensitive and store them in mixed case?True Does the database treat mixed-case, unquoted SQL identifiers as case insensitive and store them in uppercase?True Does the database treat mixed-case, quoted SQL identifiers as case insensitive and store them in uppercase?False IsALTER TABLEwith add column supported?False IsALTER TABLEwith drop column supported? Is the ANSI92 entry level SQL grammar supported? All JDBC-compliant drivers must return true. Is the ANSI92 full SQL grammar supported? Is the ANSI92 intermediate SQL grammar supported? Can a catalog name be used in a data manipulation statement? Can a catalog name be used in an index definition statement? Can a catalog name be used in a privilege definition statement? Can a catalog name be used in a procedure call statement? Can a catalog name be used in a table definition statement? Is column aliasing supported? If so, the SQLASclause can be used to provide names for computed columns or to provide alias names for columns as required. Is theCONVERTfunction between SQL types supported?True IsCONVERTbetween the given SQL types supported?True Is the ODBC Core SQL grammar supported?True Are correlated subqueries supported? A JDBC-compliant driver always returns true.True Are both data definition and data manipulation statements within a transaction supported?True Are only data manipulation statements within a transaction supported?False If table correlation names are supported, are they restricted to be different from the names of the tables?TruesupportsExpressionsInOrderBy() Are expressions inORDER BYlists supported?TruesupportsExtendedSQLGrammar() Is the ODBC Extended SQL grammar supported?TruesupportsFullOuterJoins() Are full nested outer joins supported?FalsesupportsGroupBy() Is some form ofGROUP BYclause supported?TruesupportsGroupByBeyondSelect() Can aGROUP BYclause add columns not in theSELECTprovided it specifies all the columns in theSELECT?supportsGroupByUnrelated()supportsIntegrityEnhancementFacility() Is the SQL Integrity Enhancement Facility supported?supportsLikeEscapeClause() Is the escape character inLIKEclauses supported? A JDBC-compliant driver always returns true.supportsLimitedOuterJoins() Is there limited support for outer joins? (This will be true ifsupportFullOuterJoinsis true.)supportsMinimumSQLGrammar() Is the ODBC Minimum SQL grammar supported? All JDBC-compliant drivers must return true.supportsMixedCaseIdentifiers() Does the database treat mixed-case, unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-compliant driver will always return false.False Does the database treat mixed-case, quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-compliant driver will always return true. Are multipleResultSetsfrom a single execute supported? Can multiple transactions be open at once (on different connections)? Can columns be defined as non-nullable? A JDBC-compliant driver always returns true. Can cursors remain open across commits? Can cursors remain open across rollbacks? Can statements remain open across commits? Can statements remain open across rollbacks? Can anORDER BYclause use columns not in theSELECT? Is some form of outer join supported?
Is positionedDELETEsupported? Is positionedUPDATEsupported? Can a schema name be used in a data manipulation statement? Can a schema name be used in an index definition statement? Can a schema name be used in a privilege definition statement? Can a schema name be used in a procedure call statement? Can a schema name be used in a table definition statement? IsSELECTforUPDATEsupported? Are stored procedure calls using the stored procedure escape syntax supported? Are subqueries in comparison expressions supported? A JDBC-compliant driver always returns true. Are subqueries inEXISTSexpressions supported? A JDBC-compliant driver always returns true. Are subqueries inINstatements supported? A JDBC-compliant driver always returns true. Are subqueries in quantified expressions supported? A JDBC-compliant driver always returns true. Are table correlation names supported? A JDBC-compliant driver always returns true. Does the database support the given transaction isolation level?True(for all four transaction levels) Are transactions supported? If not, commit is a no-op and the isolation level isTRANSACTION_NONE. IsSQL UNIONsupported? IsSQL UNION ALLsupported? Does the database use a file for each table? Does the database store tables in a local file?Example
The following example is a code segment that illustrates calling methods of
DatabaseMetadata:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |